package com.fc.backingbeans;

import java.io.Serializable;
import java.util.List;

import javax.faces.bean.ApplicationScoped;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.fc.entities.UnitOfMeasurement
import com.fc.service.UnitOfMeasurementService;

@Component("quantityController")
@ApplicationScoped
public class UnitOfMeasurementController implements Serializable{
	@Autowired private UnitOfMeasurementService unitOfMeasurementService
	
	private List<UnitOfMeasurement> uoms

	public List<String> getUoms() {
		if (!uoms) {
			uoms = unitOfMeasurementService.findAll()
		} 
		
		return uoms;
	}
}
